#
# 对首页进行操作
#

module IotpTest # 本文件夹的方法均属于同一个模块
  class Overview # 首页相关操作放在本类中
    def initialize(driver)
      Log.info('------------ Overview.initialize Start ------------')
      @driver = driver # 传入可用的driver对象
    end

    # 点击设备状态
    def click_device_state(name = '')
      Log.info('------------ Overview.initialize Start ------------')
      5.times {
      @driver.find_element(class: 'nextLi').click
        sleep(3)
      }
      @driver.find_element(name: name).click
    end
  end
end